/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package justdoit.utility;

import java.security.MessageDigest;

/**
 * To hash the password
 * @author Can
 */
public class Hash {

    public static byte[] hashByMD5(byte[] originalString) {
        try {
            MessageDigest md = MessageDigest.getInstance("MD5");
            md.update(originalString);
            return md.digest();
        } catch (Exception e) {
            System.out.println(e.getMessage());
            return null;
        }
    }


}
